sale=int(input("售额："))
dx=2000
if sale<=3000:
    tc=0
    xz=dx
elif sale<=7000:
    tc=0.1
    xz=dx+sale*tc
elif sale<=10000:
    tc=0.15
    xz=dx+sale*tc
else:
    tc=0.2
    xz=dx+sale*tc
print(xz)






